<?php include_partial("gestionagua/menuagua") ?>
<div id="sf_admin_container" style="width: 100%;height: 100%">
    <div style = "display: table;  width:100%;">
        <h1>LECTURAS</h1>
        <div style="float:left;margin-bottom:0px;width: 450px;"><a align="left" href="<?php echo url_for('lectura/new') ?>">    
                <img  src="/images/botonagregar.jpg"  width="69" height="22" border="1"/>
            </a> 
        </div>
        <div style="float:left;width: 78%;margin-top:0px;">

            <div id="listadoLecturas">
                <?php
                if (count($lecturas) != 0) {
                    include_partial("lectura/listadolecturas", array("lecturas" => $lecturas));
                }
                ?>
            </div>
            <br>

        </div>
        <div id="sf_admin_filter" style="float: right;margin-top:0px;margin-right: 15px;width: 20%;">

            <?php
            echo jq_form_remote_tag(array(
                'update' => 'listadoLecturas',
                'url' => 'lectura/buscarlecturas',
                'loading' => "$('#loadingLecturas').css('display', '')",
                'complete' => "$('#loadingLecturas').css('display', 'none')"
            ))
            ?>
            <table >
                <thead><tr><th colspan="2"><span style="float:left">FILTRO</span></th></tr></thead>
                <tbody id="filtros" >
                    <tr>
                        <td >
                            <label for="contribuyente"><b>Nombre</b></label>
                        </td>
                        <td >
                            <input id="nombre" name="nombre" style="text-transform:uppercase;" onkeyup="javascript:this.value=this.value.toUpperCase();">  
                        </td>
                    </tr>
                    <tr>
                        <td ><label for="contribuyente"><b>Apellido</b></label></td>
                        <td >
                            <input id="apellido" name="apellido" style="text-transform:uppercase;" onkeyup="javascript:this.value=this.value.toUpperCase();">  
                        </td>
                    </tr>
                    <tr>
                        <td><label for="contribuyente"><b>Unidad Funcional</b></label></td>
                        <td >
                            <input id="unidadfuncional" name="unidadfuncional"  onkeyup="javascript:this.value=this.value.toUpperCase();">  
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <input type="submit" style="float:right" value="Filtrar">
                            <span id="loadingLecturas" style="float:right;margin-right:10px;display: none;">
                                <img src="/images/load.gif">
                            </span>
                        </td>
                    </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<!--</div>-->